/*
 * @Description: 用户信息处理的API
 * @Author: zhihong deng
 * @Date: 2021-07-28 21:27:11
 * @LastEditors: zhihong deng
 * @LastEditTime: 2021-07-29 14:42:31
 */
import request from './request';

export function userList(page = 1,size = 2,kw = ''){
  let url = `/users?pagenum=${page}&pagesize=${size}`
  if(kw){
    url += '&query='+kw
  }
  return request({
    url,
    method: 'get',
    headers: {
      Authorization: 'token'
    }
  });
}
export function userAdd(userInfo){
  let url = `/users`;
  return request ({
    url,
    method: 'post',
    data: userInfo
  })
}
export function userDel(id){
  let url = `/users/${id}`;
  return request ({
    url,
    method: 'delete'
  })
}